<%@ page contentType="text/html; charset=UTF-8" errorPage="/WEB-INF/adm/pages/jspError.jsp"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" background="../private/admin_images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="../private/admin_images/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="../private/admin_images/tb.gif" width="16" height="16" /></div></td>
                <td width="95%" align="left"><span class="font3_12px">你当前的位置</span>：[游戏奖金设置管理]-[会员游戏奖金一览]</td>
              </tr>
            </table></td>
            <td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td width="60"><table width="87%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center">
                      <input type="checkbox" name="checkbox62" value="checkbox" />
                    </div></td>
                    <td><div align="center">全选</div></td>
                  </tr>
                </table></td>
                <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="../private/admin_images/22.gif" width="14" height="14" /></div></td>
                    <td><div align="center">新增</div></td>
                  </tr>
                </table></td>
                <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="../private/admin_images/33.gif" width="14" height="14" /></div></td>
                    <td><div align="center">修改</div></td>
                  </tr>
                </table></td>
                <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="../private/admin_images/11.gif" width="14" height="14" /></div></td>
                    <td><div align="center">删除</div></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="../private/admin_images/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  
  <tr>
  	<td height="50" >
  	
		<table width="100%" height="50" border="0" cellspacing="0" cellpadding="0">
  			<tr>
  				<td width="8" background="../private/admin_images/tab_12.gif">&nbsp;</td>
  				<td align="left" width="230">会员名称：<input type="text" id="userName_input" name="userName_input" size="20" style="border:1px solid #999999;"/></td>
  				<td align="left" width="320">游戏类型：
  					<select id="gameType_input" name="gameType_input"  style="width:250px">
  						<option value="">---全部游戏类型---</option>
  						<logic:notEmpty name="ADM_GAMETYPE_LIST">
  						<logic:iterate id="gametype" name="ADM_GAMETYPE_LIST">
  						<option value='<bean:write name="gametype" property="gameid"/>'><bean:write name="gametype" property="gamename" /></option>
  						</logic:iterate>
  						</logic:notEmpty>
  					</select>
  					
  				</td>
  				<td align="left" width="320">下注类型：
  					<select id="betType_input" name="betType_input" style="width:250px">
  						<option value="">---全部下注类型---</option>
  						<logic:notEmpty name="ADM_BETTYPE_LIST">
  						<logic:iterate id="bettype" name="ADM_BETTYPE_LIST">
  						<option value='<bean:write name="bettype" property="betid"/>'><bean:write name="bettype" property="betname" /></option>
  						</logic:iterate>
  						</logic:notEmpty>
  					</select>
  				</td>
  				
  				<td align="left"><input type="button" id="queryButton" name="queryButton" value="  查询   " onclick="return submitQuery();"/></td>
  				<td width="8" background="../private/admin_images/tab_15.gif" align="right">&nbsp;</td>
  			</tr>
  		</table>
	
  	</td>
  </tr>
  
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="../private/admin_images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onmouseover="changeto()"  onmouseout="changeback()">
          <tr>
            <td width="12%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">编号</td>
            <td width="14%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">会员名称</td>
            <td width="17%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">游戏类型</td>
            <td width="15%" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">下注类型</td>
            <td width="8%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">奖金(元)</td>
            <td width="8%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">最高奖金(元)</td>
            <td width="8%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">返点百分比(%)</td>
            <td width="11%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">创建时间</td>
            <td width="7%" height="22" background="../private/admin_images/bg_h.gif" bgcolor="#FFFFFF">基本操作</td>
          </tr>
          <logic:notEmpty name="VIEW_HELPER">
          <logic:iterate id="bonus" name="VIEW_HELPER">
          <tr>
            <td height="20" bgcolor="#FFFFFF">
            	<span title="查看会员奖金详细信息" style="cursor:hand" onclick="edit('<bean:write name="bonus" property="id" />');"><bean:write name="bonus" property="id" /></span>
            </td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="username" /></td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="gametypename" /></td>
            <td bgcolor="#FFFFFF"><bean:write name="bonus" property="bettypename" /></td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="bonus" /></td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="maxbonus" /></td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="returnpos" /></td>
            <td height="20" bgcolor="#FFFFFF"><bean:write name="bonus" property="createtime" /></td>
            <td height="20" bgcolor="#FFFFFF">
            	<span  title="查看会员奖金详细信息" class="font4_12px" style="cursor:hand" onclick="edit('<bean:write name="bonus" property="id" />');"><img src="../private/admin_images/edt.gif" width="16" height="16" />查看</span>
            </td>
          </tr>
          </logic:iterate>
          </logic:notEmpty>
          
          <logic:empty name="VIEW_HELPER">
          <tr>
          	<td height="50" bgcolor="#FFFFFF"  colspan="9"><font color="red">没有查询到符合条件的记录！</font></td>
          </tr>
          </logic:empty>
        </table></td>
        <td width="8" background="../private/admin_images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35" background="../private/admin_images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       
        <td width="12" height="35"><img src="../private/admin_images/tab_18.gif" width="12" height="35" /></td>
        
        <logic:notEmpty name="VIEW_HELPER">
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="font4_12px">&nbsp;&nbsp;共有 <bean:write name="ADMBonusForm" property="totalRecord"/> 条记录，
            当前第 <bean:write name="ADMBonusForm" property="currentPage"/>/<bean:write name="ADMBonusForm" property="totalPage"/> 页</td>
            <td><table border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40" style="cursor:hand" onclick="query(<bean:write name='ADMBonusForm' property='firstPage'/>);"><img src="../private/admin_images/first.gif" width="37" height="15" /></td>
                  <td width="45">
                  	<logic:equal name="ADMBonusForm" property="hasPrevious" value="true">
                  	<a href="javascript:query(<bean:write name='ADMBonusForm' property='previousPage'/>);"><img src="../private/admin_images/back.gif" width="43" height="15" border="0"/></a>
                  	</logic:equal>
                  	
                  	<logic:equal name="ADMBonusForm" property="hasPrevious" value="false">
                  	<img src="../private/admin_images/back.gif" width="43" height="15" />
                  	</logic:equal>
                  </td>
                  <td width="45">
                  	<logic:equal name="ADMBonusForm" property="hasNext" value="true">
                  	<a href="javascript:query(<bean:write name='ADMBonusForm' property='nextPage'/>);"><img src="../private/admin_images/next.gif" width="43" height="15" border="0"/></a>
                  	</logic:equal>
                  	<logic:equal name="ADMBonusForm" property="hasNext" value="false">
                  	<img src="../private/admin_images/next.gif" width="43" height="15" />
                  	</logic:equal>
                  </td>
                  <td width="40" style="cursor:hand" onclick="query(<bean:write name='ADMBonusForm' property='totalPage'/>);"><img src="../private/admin_images/last.gif" width="37" height="15" /></td>
                  <td width="100"><div align="center">转到第
                    <input id="textfield" name="textfield" type="text" size="4" style="height:12px; width:20px; border:1px solid #999999;" /> 
                    页 </div></td>
                  <td width="40" style="cursor:hand" onclick="query(document.getElementById('textfield').value);"><img src="../private/admin_images/go.gif" width="37" height="15" /></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        </logic:notEmpty>
        <logic:empty name="VIEW_HELPER">
        <td></td>
        </logic:empty>
        <td width="16"><img src="../private/admin_images/tab_20.gif" width="16" height="35" /></td>
        
      </tr>
    </table></td>
  </tr>
</table>
</div>
<html:form action="/adm/listBonus" method="post">
	<html:hidden property="userName"/>
	<html:hidden property="gameType"/>
	<html:hidden property="currentPage" />
	<html:hidden property="betType" />
	<html:hidden property="bonusID" />
	<html:hidden property="operator" />
</html:form>
<script type="text/javascript">
<!--
function submitQuery(){
	document.all.userName.value = document.getElementById("userName_input").value;
	document.all.gameType.value = document.getElementById("gameType_input").value;
	document.all.betType.value = document.getElementById("betType_input").value;
	document.all.currentPage.value = "1";
	document.all.ADMBonusForm.submit();
	return true;
}
function query(page){
	if(page=="" || isNaN(page)){
		alert("页数必须为数字！");
		return;
	}
	document.all.currentPage.value = page;
	document.all.ADMBonusForm.submit();
}
function edit(bonusID){
	document.all.bonusID.value = bonusID;
	document.all.operator.value = "3";
	document.all.ADMBonusForm.action="viewUserBonus.wss";
	document.all.ADMBonusForm.submit();
}
document.getElementById("userName_input").value="<bean:write name='ADMBonusForm' property='userName'/>";
document.getElementById("gameType_input").value="<bean:write name='ADMBonusForm' property='gameType'/>";
document.getElementById("betType_input").value="<bean:write name='ADMBonusForm' property='betType'/>";
//-->
</script>